// import { Link } from 'react-router-dom';
import { useNavigate } from 'react-router-dom';
const Login = () => {
const nav = useNavigate();
  return (
    <div>
      登录页面
      {/* 声明 */}
      {/* <Link to='/article'>去文章</Link> */}
      {/* 编程 */}
      <button onClick={()=>{nav('/article')}}>去文章</button>
      {/* 第一种传参 */}
      {/* <button onClick={()=>{nav('/article?id=100&&name=传递了')}}>useSearchParams传参</button> */}
      <button onClick={()=>{nav('/article?id=100&&name=传递了')}}>useSearchParams传参</button>
    </div>
  );
};
export default Login;
